#pragma once
#include "core.h"
#include <QString>

class QJsonObject;
class S_CORE_EXPORT DevCfg
{
public:
    ~DevCfg();
    static DevCfg& instance();
    bool getInt(const QString& key, int& v, int dft = 0);
    bool getString(const QString& key, QString& str, QString dft = "");
    bool getBoolean(const QString& key, bool& v, bool dft = false);
    void loadCfgs();
private:
    DevCfg();
    
private:
    QJsonObject* m_cfgObj = nullptr;
};

